package learnjava.basic.other;

public class JavaNoteDay13 {
    public static void main(String[] args) {
//        String s1 = "abcwerthelloyuiodef";
//        String s2 = "cvhellobnm";
//        System.out.println(getMaxSubString(s2,s1));
//        StringBuilder sb = new StringBuilder();
//        sb.insert(0,true);
//        System.out.println(sb.toString());
        Integer a = -127;
        Integer b = -127;
        System.out.println(a==b);

        a = -128;
        b = -128;
        System.out.println(a==b);

        a = 127;
        b = 127;
        System.out.println(a==b);

        a = 128;
        b = 128;
        System.out.println(a==b);
    }
    public static String getMaxSubString(String max, String min){
//        String max = "", min = "";
//        max = s1.length()>s2.length()?s1:s2;
//        min = max==s1?s2:s1;
        System.out.println("max"+max+"\n"+"min"+min);
        for (int x = 0; x < min.length(); x++) {
            //对长度为x的所有子串进行检查
            for (int y = 0, z=min.length()-x; z!=min.length()+1 ; y++,z++) {
                String temp = min.substring(y,z);
                if(max.contains(temp)) return temp;
            }
        }
        return "";
    }
}
